import 'package:flutter/material.dart';
import 'package:client/view/chatroom/chatroom_online.dart';
import 'package:client/view/chatroom/chatroom_talk.dart';

class ChatroomRoute extends StatefulWidget {
  const ChatroomRoute({super.key});

  @override
  _ChatroomRouteState createState() => _ChatroomRouteState();
}

class _ChatroomRouteState extends State<ChatroomRoute>
    with AutomaticKeepAliveClientMixin {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // appBar: AppBar(
      //   title: Text("on line"),
      // ),
      // body:  ListView(
      //   children: listItem,
      // ),
      body: Row(
        children: [
          Expanded(
              flex: 1,
              child: Container(
                decoration: BoxDecoration(border: Border(right: BorderSide())),
                // color: Colors.yellow,
                height: double.infinity,
                child: ChatroomOnline(),
              )),
          Expanded(
              flex: 4,
              child: Container(
                // color: Colors.red,
                height: double.infinity,
                child: ChatroomTalk(),
              )),
        ],
      ),
    );
  }

  @override
  bool get wantKeepAlive => true;
}
